import "./grid-item.scss";
export default defineComponent({
	name: "GridItem",
	props: {
		label: { type: String, required: true },
		style: String,
		nosection: Boolean
	},
	setup(props, { slots }) {
		return () => (
			<div
				class="react-grid-item react-draggable react-resizable"
				data-panelid="185"
				style={props.style ?? "top: 38px; left: 0px;  height: 258px; position: absolute;"}
			>
				<div class="panel-container">
					{console.log(props.nosection)}
					{props.nosection == true ? (
						""
					) : (
						<section class="panel-info-corner panel-info-corner--info" aria-label="Panel header info">
							<i aria-hidden="true" class="fa"></i>
							<span class="panel-info-corner-inner"></span>
						</section>
					)}
					<div class="panel-header grid-drag-handle">
						<header
							data-testid="data-testid Panel header 服务器资源总览表【JOB：cadvisor，主机总数：None】"
							class="panel-title-container"
						>
							<div class="panel-title">
								<h2 class="css-1m35bcr">{props.label}</h2>
								<div class="css-1vzus6i-Icon">
									<svg
										xmlns="http://www.w3.org/2000/svg"
										viewBox="0 0 24 24"
										width="16"
										height="16"
										class="css-sr6nr panel-menu-toggle"
									>
										<path d="M17,9.17a1,1,0,0,0-1.41,0L12,12.71,8.46,9.17a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42l4.24,4.24a1,1,0,0,0,1.42,0L17,10.59A1,1,0,0,0,17,9.17Z"></path>
									</svg>
								</div>
							</div>
						</header>
					</div>
					{slots.default?.()}
					{/* <div class="panel-content panel-content--no-padding table-panel-content">{slots.default?.()}</div> */}
				</div>
				<span class="react-resizable-handle react-resizable-handle-se"></span>
			</div>
		);
	}
});
